<?php

namespace app\common\logic;

class RandCreateStrLogic
{
    /**
     * @Description 随机生成指定长度字符串
     * @author: zj
     * @param int $len
     * @time 2023/12/02 16:34:44
     * @return string
     */
    public function create(int $len)
    {
        $chars='ABCDEFGHJKLMNPQRSTUVWXYZ23456789abcdefghjkmnpqrstuvwxyz';
        $string='';
        for ( $i = 0; $i < $len; $i++ )
        {
            $string .= $chars[ mt_rand(0, strlen($chars) - 1) ];
        }

        return $string;
    }

}